// export default function(target) {
//   for (let i = 1, j = arguments.length; i < j; i++) {
//     let source = arguments[i] || {};
//     for (let prop in source) {
//       if (source.hasOwnProperty(prop)) {
//         let value = source[prop];
//         if (value !== undefined) {
//           target[prop] = value;
//         }
//       }
//     }
//   }
//
//   return target;
// };
// 修改上方sonar扫描问题 ----------------------start-------------------------
export default function (target) {
  function mergeProperties(targetObj, source) {
    for (let prop in source) {
      if (source.hasOwnProperty(prop)) {
        assignProperty(targetObj, source, prop);
      }
    }
  }

  function assignProperty(targetObj, source, prop) {
    const value = source[prop];
    if (value !== undefined) {
      targetObj[prop] = value;
    }
  }

  for (let i = 1, j = arguments.length; i < j; i++) {
    const source = arguments[i] || {};
    mergeProperties(target, source);
  }

  return target;
}
// 修改上方sonar扫描问题 ----------------------start-------------------------
